package com.pmsystem.dao;

import com.pmsystem.pojo.Complaint;
import com.pmsystem.pojo.ComplaintExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface ComplaintMapper {
    long countByExample(ComplaintExample example);

    int deleteByExample(ComplaintExample example);

    int deleteByPrimaryKey(Integer complaintId);

    int insert(Complaint record);

    int insertSelective(Complaint record);

    List<Complaint> selectByExample(ComplaintExample example);

    Complaint selectByPrimaryKey(Integer complaintId);

    int updateByExampleSelective(@Param("record") Complaint record, @Param("example") ComplaintExample example);

    int updateByExample(@Param("record") Complaint record, @Param("example") ComplaintExample example);

    int updateByPrimaryKeySelective(Complaint record);

    int updateByPrimaryKey(Complaint record);

    /**
     * 
     * <p>Title: findByUserId</p >  
     * <p>Description: 根据userId查投诉</p >  
     * @author 泽强
     * @param userId
     * @return
     */
	List<Complaint> findByUserId(int userId);

	/**
	 * 
	 * <p>Title: findComplaint</p >  
	 * <p>Description: 按一定条件查询投诉，注意SQL语句</p >  
	 * @author 泽强
	 * @param map
	 * @return
	 */
	List<Map<String, Object>> findComplaint(Map<String, Object> map);

	long countComplaint(Map<String, Object> map);

}